<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title>注册页面</title>
		<link rel="stylesheet" type="text/css" href="fonts/iconfont.css" />
		<script src="js/rem.js" type="text/javascript" charset="utf-8"></script>
		<link rel="stylesheet" type="text/css" href="css/base.css" />
		<link rel="stylesheet" type="text/css" href="css/register.css" />
	</head>
	<body>
		<div class="container">
			<!-- header -->
			<header>
				<a href="login.html"><span class="iconfont icon-left"></span></a>
				<span class="s1">手机号注册</span>
				<span></span>
			</header>

			<!-- main -->
			<main>
				<div class="con">
					<div class="c">
						<span>+86</span>
						<span class="iconfont icon-triangle-copy-copy-copy
							">:</span>
					</div>
					<form class="f1" action="" method="">
						<input class="ipt" type="text" name="" id="" value="(请输入正确的手机号)" />

					</form>
				</div>


				<div class="con">
					<div class="c">
						<span>密&nbsp;&nbsp;&nbsp;&nbsp;码 :</span>
					</div>
					<form class="f2" action="" method="">
						<input class="ipt2" type="text" name="" id="" value="&nbsp;(请输入6-15位数字或密码)" />

						
						<!-- <button type="button" class="ss">获取短信验证码</button> -->
					</form>
				</div>


				<div class="main2">
					<p>点击"注册"按钮,代表你已经阅读并同意&nbsp;&nbsp;<a href="">用户注册协议</a></p>
				</div>
				<div class="main3">
					<button type="button" class="btn">注册</button>
				</div>
			</main>

			<script src="js/reg.js" type="text/javascript" charset="utf-8"></script>
			<script src="js/axios.min.js" type="text/javascript" charset="utf-8"></script>
			
			<script type="text/javascript">
				let ipt1=document.querySelector(".ipt")
				let ipt3=document.querySelector(".ipt2");
				let regBtn=document.querySelector(".btn");
				let registerApi="http://15637237221.wicp.vip/yh//mine/regedit.do"
				regBtn.onclick=function(){
						let loginCount=ipt1.value;
						let password=ipt3.value;
						axios.post(registerApi,{
								loginCount,
								password
						})
						.then(res=>{
							console.log(res.data);
							if (res.data.code==0) {
								location.href='login.html'
							} else{
								alert(res.data.msg)
							}
							
						}).catch(error=>{
							console.log(error);
						})
					} 
					
					
				
			</script>
		</div>
		
		
		
	</body>
</html>
